//
//  TCLYShopBtnView.m
//  YuErmuYing
//
//  Created by LYang on 16/9/5.
//  Copyright © 2016年 Tiancheng. All rights reserved.
//

#import "TCLYShopBtnView.h"
#import "Macros.h"
#import "Masonry.h"

@implementation TCLYShopBtnView
-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.layer.cornerRadius = 10;
        
        for (int i = 0; i<3; i++) {
            for (int j = 0; j<3; j++) {
                UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
                btn.tag = 400+j+i*3;
                [btn setImage:[UIImage imageNamed:[NSString stringWithFormat:@"integralHomeBtn%d",j+i*3+1]] forState:UIControlStateNormal];
                btn.frame = CGRectMake((25/375.0*screenWidth)+(72/375.0*screenWidth)*j+10/375.0*screenWidth*j, 18/375.0*screenWidth+72/375.0*screenWidth*i+10/375.0*screenWidth*i, 72/375.0*screenWidth, 72/375.0*screenWidth);
                [self addSubview:btn];
                
            }
        }
    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
